package com.glsc.ngateway.platform.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class FlowParamDevManageSearchDto implements Serializable {
    //startUser,dealUser,involveUser  三者必选其一
    //如果都不传，则processDefineKey必填
    //其他参数随意，可传可不传


    @ApiModelProperty(value = "流程ID")
    private String processId;

    @ApiModelProperty(value = "流程创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime processCreateTime;

    @ApiModelProperty(value = "起始时间")
    private String beginDate;

    private LocalDateTime beginDateLocalDate;
    @ApiModelProperty(value = "结束时间")
    private String endDate;

    private LocalDateTime endDateLocalDate;

    /**
     * 流程标题
     */
    @ApiModelProperty(value = "流程标题")
    String processTitle;

    /**
     * 需求标题
     */
    @ApiModelProperty(value = "需求标题")
    String demandTitle;


    /**
     * 发起人姓名
     */
    @ApiModelProperty(value = "发起人姓名")
    String flowCreateOperatorName;

    /**
     * 发起人账号oa
     */
    @ApiModelProperty(value = "发起人账号oa")
    String flowCreateOperatorAccount;

    @ApiModelProperty(value = "任务人账号oa")
    String taskAccount;

    @ApiModelProperty(value = "任务人账号关联的流程id")
    List<String> taskProcessId;

    @ApiModelProperty(value = "发起人部门名称")
    String flowCreatorDepartment;

    /**
     * 系统名称
     */
    @ApiModelProperty(value = "所属系统")
    private String systemName;

    /**
     * 系统代码
     */
    @ApiModelProperty(value = "系统代码")
    private String systemCode;

    private List<String> systemCodes;

    /**
     * 系统管理员姓名
     */
    @ApiModelProperty(value = "项目经理姓名")
    private String systemAdminName;


    /**
     *系统管理员账号oa
     */
    @ApiModelProperty(value = "项目经理账号oa")
    private String systemAdminAccount;

    /**
     * 系统管理员姓名
     */
    @ApiModelProperty(value = "系统归属部门")
    private String systemBelongDepartment;

    @ApiModelProperty(value = "需求分类 字典")
    private String demandClass;

    @ApiModelProperty(value = "需求分级 字典")
    private String demandGrade;

    @ApiModelProperty(value = "需求背景")
    private String demandBackground;

    @ApiModelProperty(value = "需求目标")
    private String demandPurpose;

    @ApiModelProperty(value = "需求来源")
    private String demandFrom;

    @ApiModelProperty(value = "需求关联方名称")
    private String demandRelateName;

    @ApiModelProperty(value = "需求关联方账号oa")
    private String demandRelateAccount;

    @ApiModelProperty(value = "需求概述")
    private String demandSummary;

    @ApiModelProperty(value = "需求边界")
    private String demandBoundary;

    @ApiModelProperty(value = "需求风险")
    private String demandRisk;

    @ApiModelProperty(value = "需求详述")
    private String demandDetail;

    @ApiModelProperty(value = "是否立项 字典")
    private String demandSetup;

    @ApiModelProperty(value = "立项结果")
    private String demandSetupResult;

//    @ApiModelProperty(value = "是否需要OA合规评审")
//    private String demandNeedOaOk;
//
//    @ApiModelProperty(value = "OA合规评审流程")
//    private String demandOaOkTitle;
//
//    @ApiModelProperty(value = "OA合规评审结果")
//    private String demandOaOkResult;
//
//    @ApiModelProperty(value = "所需人天")
//    private String demandDay;

    @ApiModelProperty(value = "是否完成 ")
    private Integer isClose;

    @ApiModelProperty(value = "当前审批")
    private String currentNode;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime insertTime;

    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    protected LocalDateTime updateTime;

    private Integer pageNo;

    private Integer pageSize;
}
